dynamic-lib=libmymath.so

$(dynamic-lib):add.o sub.o
	gcc -shared -o $@ $^
add.o sub.o:add.c sub.c
	gcc -fPIC -c $^
	
.PHONY:clean
clean:
	rm -rf *.o *.a $(dynamic-lib) mylib 

.PHONY:output
output:
	mkdir -p mylib/include
	mkdir -p mylib/lib
	cp *.h mylib/include/
	cp *.a mylib/lib/
	
